# @Version        : 1.0
# @Update Time    : 2025/9/15 22:24
# @File           : oauth2.py
# @IDE            : PyCharm
# @Desc           : 文件描述信息
from authx.security.schemes import MultiSourceOAuth2Bearer
from authx.settings.config import settings

oauth2_required = MultiSourceOAuth2Bearer(
    token_url=settings.TOKEN_URL,
    is_read_header=settings.IS_READ_HEADER,
    is_read_cookie=settings.IS_READ_COOKIE,
    is_read_query=settings.IS_READ_QUERY,
    cookie_name=settings.TOKEN_NAME,
    auto_error=False,
)
